Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore msposd_jetson for gs on jetson orin #29

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

lida2003
Copy link
Contributor

No description provided.

@henkwiedig
Copy link
Collaborator

@lida2003 what is the point in having a jetson architecture in the first place ? The only useful difference to x86 is the environment setting.
Is there a problem running msposd useing DISPLAY=:0 msposd on jetson ?

@henkwiedig
Copy link
Collaborator

At best you provide a cross compile integration for build.sh like all other architectures currently do.
Like here: https://docs.nvidia.com/jetson/archives/r35.2.1/DeveloperGuide/text/AT/JetsonLinuxToolchain.html

@lida2003
Copy link
Contributor Author

lida2003 commented Nov 25, 2024

Is there a problem running msposd useing DISPLAY=:0 msposd on jetson ?

I got it running without any problem on jetson. But on my laptop, it seems useless.

@henkwiedig Jetson has many toolchain versions. We can do this using x86 cross-compilation, but I don't know which version to use, or focused on which version.

As I use remote ssh login most of time, so I add this code.

And I also noticed that there is a sdk path "$(eval SDK = ./sdk/gk7205v300)", which I'm NOT sure if there is any common head files used.

@lida2003
Copy link
Contributor Author

@henkwiedig Hope there is jetson gs, which is something like radax. Then it'll be much more specific cross-compile tool.

@henkwiedig
Copy link
Collaborator

Still don't get it. Currently the jetson architecture adds nothing to the project.
It's just another way to call the system native build tools.
You locally could just use build.sh x86 end end up with the same binary. (just named msposd_x86)
But for all others there is no central usage.

Maybe we should rework build.sh do do either xcompile (goke|hisi|star6b0|star6e) or use system native build environment (x86|jetson). This could also be used on radxa when building on radxa directly.

@lida2003
Copy link
Contributor Author

lida2003 commented Nov 25, 2024

there are three points:

  1. compile tool - cross compile or native build
  2. binary target - for different target board
  3. application binary - moposd

msposd_xxx, those xxx stands for target board.

Normally we use buildroot to build rootfs, compiling application. There is no such name, msposd_xxx.

The build.sh is a script to simple build msposd for different target, using cross compile tool or native tool to generate msposd_xxx target, then copied to release/xxx/ dir.

That's what build.sh and those names for.

@henkwiedig
Copy link
Collaborator

I thought about modifying build.sh as follows:

if [ "$1" = "goke" ]; then
	DRV=$PWD/firmware/general/package/goke-osdrv-gk7205v200/files/lib
	make -B CC=$GCC DRV=$DRV TOOLCHAIN=$PWD/toolchain/$CC OUTPUT=$OUT $1
elif [ "$1" = "hisi" ]; then
	DRV=$PWD/firmware/general/package/hisilicon-osdrv-hi3516ev200/files/lib
	make -B CC=$GCC DRV=$DRV TOOLCHAIN=$PWD/toolchain/$CC OUTPUT=$OUT $1
elif [ "$1" = "star6b0" ]; then
	DRV=$PWD/firmware/general/package/sigmastar-osdrv-infinity6b0/files/lib
	make -B CC=$GCC DRV=$DRV TOOLCHAIN=$PWD/toolchain/$CC OUTPUT=$OUT $1
elif [ "$1" = "star6e" ]; then
	DRV=$PWD/firmware/general/package/sigmastar-osdrv-infinity6e/files/lib
	make -B CC=$GCC DRV=$DRV TOOLCHAIN=$PWD/toolchain/$CC OUTPUT=$OUT $1
else
	DRV=$PWD
	make DRV=$DRV OUTPUT=$OUT native
fi

Additionally, I would add the native target to the Makefile while removing the x86 and jetson targets.
This approach ensures that building against the native toolchain is architecture-agnostic.
Only cross-compiled builds will rely on specific toolchains.

@lida2003
Copy link
Contributor Author

lida2003 commented Nov 25, 2024

Right now, the difference is below, which is for ssh remote launch (works on jetson). But it wouldn't work on my laptop(x86). I hope it will work on other software stack (versions), as it's a common API. I don't know why it didn't work on my x86.

#ifdef _jetson
if (getenv("DISPLAY") == NULL) {
/*
* Use default display screen, especially launch from console
* ToDo: x86 linux should implement this code also, test needed.
*/
setenv("DISPLAY", ":0", 1);
}
#endif

--- PS: here is my test environment on jetson

Software part of jetson-stats 4.2.12 - (c) 2024, Raffaello Bonghi
Model: NVIDIA Orin Nano Developer Kit - Jetpack 5.1.4 [L4T 35.6.0]
NV Power Mode[0]: 15W
Serial Number: [XXX Show with: jetson_release -s XXX]
Hardware:
 - P-Number: p3767-0005
 - Module: NVIDIA Jetson Orin Nano (Developer kit)
Platform:
 - Distribution: Ubuntu 20.04 focal
 - Release: 5.10.216-tegra
jtop:
 - Version: 4.2.12
 - Service: Active
Libraries:
 - CUDA: 11.4.315
 - cuDNN: 8.6.0.166
 - TensorRT: 8.5.2.2
 - VPI: 2.4.8
 - OpenCV: 4.9.0 - with CUDA: YES

Python Environment:
Python 3.8.10
    GStreamer:                   YES (1.16.3)
  NVIDIA CUDA:                   YES (ver 11.4, CUFFT CUBLAS FAST_MATH)
     OpenCV version: 4.9.0  CUDA True
       YOLO version: 8.3.33
      Torch version: 2.1.0a0+41361538.nv23.06
Torchvision version: 0.16.1+fdea156
  • laptop
PRETTY_NAME="Ubuntu 22.04.5 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.5 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy

lida2003 added a commit to SnapDragonfly/msposd that referenced this pull request Nov 25, 2024
Discussion: [ Ignore msposd_jetson for gs on jetson orin OpenIPC#29 ](OpenIPC#29)
@lida2003
Copy link
Contributor Author

lida2003 commented Nov 25, 2024

@henkwiedig I think it works on my x86. You have to test before use, as my laptop is weird about this posix API.

Use native build instead of x86/jetson target #31

lida2003 added a commit to SnapDragonfly/msposd that referenced this pull request Nov 26, 2024
Discussion: [ Ignore msposd_jetson for gs on jetson orin OpenIPC#29 ](OpenIPC#29)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants